<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>MVVM</title>
</head>
<body>
<div id="app">
    <h2>{{name}}</h2>
</div>
<script src="./mvvm-master/js/observer.js"></script>
<script src="./mvvm-master/js/compile.js"></script>
<script src="./mvvm-master/js/watcher.js"></script>
<script src="./mvvm-master/js/mvvm.js"></script>
<script>
    /**
     * 解析表达式
     * 1. 从文本节点中取出表达式
     * 2. 从data中取出表达式对应的属性值
     * 3. 将属性值设置为文本节点的textContent
     */
    const vm = new MVVM({
        el: "#app",
        data: {
            name: "aa"
        }
    });


</script>
</body>
</html>